package com.agent.user.entity;

import com.agent.common.constant.CommonConstants;
import com.agent.common.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;

/**
 * 用户实体类
 * @author Jeff_Wan
 * @description 用户基本信息表
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("user")
public class User extends BaseEntity {
    /**
     * 用户名
     */
    private String username;
    /**
     * 邮箱
     */
    private String email;
    /**
     * Google登录ID
     */
    private String googleId;
    /**
     * 头像URL
     */
    private String avatarUrl;
    /**
     * 密码
     */
    private String password;
    /**
     * 会员类型('FREE','BASIC','PRO','MAX')
     */
    private String membershipType;
    /**
     * 订阅类型('MONTHLY','YEARLY')
     */
    private String subscriptionType;
    /**
     * 订阅开始日期
     */
    @JsonFormat(pattern = CommonConstants.DATE_FORMAT_UTC, timezone = CommonConstants.TIME_ZONE_UTC)
    private LocalDateTime subscriptionStartDate;
    /**
     * 订阅结束日期
     */
    @JsonFormat(pattern = CommonConstants.DATE_FORMAT_UTC, timezone = CommonConstants.TIME_ZONE_UTC)
    private LocalDateTime subscriptionEndDate;
}